package main

import (
	"context"

	"github.com/cloudwego/eino-ext/components/model/qwen"
	"github.com/cloudwego/eino/components/model"
)

func newChatModel(ctx context.Context) (cm model.ChatModel, err error) {
	// TODO Modify component configuration here.
	config := &qwen.ChatModelConfig{
		BaseURL: "https://dashscope.aliyuncs.com/compatible-mode/v1",
		APIKey:  "",
		Model:   "qwen-max-2025-01-25"}
	cm, err = qwen.NewChatModel(ctx, config)
	if err != nil {
		return nil, err
	}
	return cm, nil
}
